<?php
/*
@author Aurelien Deharbe

This file is part of Cute-Client.

Cute-Client is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Cute-Client is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with Cute-Client.  If not, see <http://www.gnu.org/licenses/>.
*/

require(dirname(__FILE__) . "/../cuteclient/csclient.php");

$c = new CSClient("localhost", 5000);
$s = $c->joinSession("example05");

function button_clicked($sender) {
  global $s;
  print_r($s->getData("<data>"));
}

$s->registerCallback("<sendbtn>", "clicked", button_clicked);

$s->mainloop();

?>